package com.imooc.exceptions;

import com.imooc.grace.result.ResponseStatusEnum;

/**
 * @author 啊昌
 * @date 2025/9/11 21:38
 * MyCustomException 自定义异常
 */
public class MyCustomException extends  RuntimeException{
	private ResponseStatusEnum responseStatusEnum;

	public MyCustomException(ResponseStatusEnum responseStatusEnum) {
		super("异常状态码为：" + responseStatusEnum.status() +
				"异常信息为：" + responseStatusEnum.msg());
		this.responseStatusEnum = responseStatusEnum;
	}

	public ResponseStatusEnum getResponseStatusEnum() {
		return responseStatusEnum;
	}

	public void setResponseStatusEnum(ResponseStatusEnum responseStatusEnum) {
		this.responseStatusEnum = responseStatusEnum;
	}


}
